package com.alks.function.mapper.stockdept.pcfactorystockquery;

import com.alks.entity.data.entity.PcDrawDetail;
import com.alks.function.data.dto.stockdept.pcfactorystockwork.DrawDetailDto;
import com.alks.function.data.request.stockdept.pcfactorystockwork.DrawActProRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.DrawDetailRequest;
import com.alks.function.data.vo.stock.ReDrawVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
* @author Administrator
* @description 针对表【PC_DRAW_DETAIL(指令领料明细)】的数据库操作Mapper
* @createDate 2023-10-13 16:24:34
* @Entity generator.domain.PcDrawDetail
*/

@Mapper
public interface SD_SQ_PcDrawDetailMapper extends BaseMapper<PcDrawDetail> {

    /*找出领料明细数据*/
    List<DrawDetailDto> getDrawDetailQuery(@Param("request") DrawDetailRequest request, @Param("companyId") String companyId);

    /*更新实发数据*/
    void DrawActProUp(@Param("request") List<DrawActProRequest> request, @Param("companyId") String companyId);

    /**
     * 获取重复请领部分数据
     */
    List<ReDrawVo> reDrawDateQuery(@Param("companyId") String companyId);

    /**
     * 领料单实发数据回滚
     */
    void drawRollBack(@Param("handlerList") List<ReDrawVo> handlerList, @Param("companyId") String companyId);

    /**
     * 获取错误领料单数据
     */
    List<ReDrawVo> getErrSlipDate(@Param("companyId") String companyId);

    /**
     * 获取实发数据
     * @param request ID集合
     * @param companyId 公司ID
     * @return 材料替代后实发数据
     */
    List<PcDrawDetail> actDataQuery(@Param("request") List<DrawActProRequest> request, @Param("companyId") String companyId);
}
